package com.heima.api.user;

import com.heima.model.common.dtos.PageResponseResult;
import com.heima.model.common.dtos.ResponseResult;
import com.heima.model.user.dtos.ApUserRealnameDto;
import com.heima.model.user.dtos.UserRelationDto;
import com.heima.model.user.pojos.ApUser;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

@FeignClient("leadnews-user")
public interface IUserClient {
    @PostMapping("/api/v1/list")
    public PageResponseResult list(@RequestBody ApUserRealnameDto dto);

    @PostMapping("/api/v1/authFail")
    public ResponseResult authFail(@RequestBody ApUserRealnameDto dto);

    @PostMapping("/api/v1/authPass")
    public ResponseResult authPass(@RequestBody ApUserRealnameDto dto);

    @PostMapping("/api/v1/user/is_follow")
    Boolean isFollows(@RequestBody UserRelationDto dto);

    @GetMapping("/api/v1/user/{id}")
    ApUser getUserById(@PathVariable("id") Integer id);



}
